Skip to content

Conversation

@Rohit3523
Copy link
Contributor

@Rohit3523 Rohit3523 commented Jan 8, 2026

Proposed changes

This PR introduce the change where, when a pull request is merged into the develop branch, the CI pipeline will:

  • Collect commit messages from the latest tag (based on creation date)
  • Save the commit messages as a .txt file so the same release notes can be reused for both platforms
  • Trim release notes to meet store limits, App Store allows max 4000 characters and Android allows max 500 characters
  • Upload the generated release notes to both platforms with the build
  • Automatically add external users to the iOS testing group and notify them when the build is available

Build PR Action: https://github.com/RocketChat/Rocket.Chat.ReactNative/actions/runs/20957468091
Build Develop Action: https://github.com/RocketChat/Rocket.Chat.ReactNative/actions/runs/20957466882

Issue(s)

https://rocketchat.atlassian.net/browse/CORE-1634

How to test or reproduce

Screenshots

iOS Build Android Build
Screenshot 2026-01-13 at 10 03 47 PM Screenshot 2026-01-13 at 10 04 14 PM

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • Improvement (non-breaking change which improves a current function)
  • New feature (non-breaking change which adds functionality)
  • Documentation update (if none of the other choices apply)

Checklist

  • I have read the CONTRIBUTING doc
  • I have signed the CLA
  • Lint and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works (if applicable)
  • I have added necessary documentation (if applicable)
  • Any dependent changes have been merged and published in downstream modules

Further comments

Summary by CodeRabbit

  • Chores
    • Added automated changelog generation and artifact upload from commit history.
    • Integrated changelog preparation into Android Play Store release flow.
    • Added conditional changelog handling for iOS TestFlight uploads.
    • Updated build workflows to run changelog generation before app build and upload steps.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 8, 2026

Walkthrough

Adds automated changelog generation and consumption to mobile CI: a new workflow creates a release-changelog artifact; build jobs depend on it and download/process the changelog before uploading to Play Store or TestFlight with truncation and conditional metadata steps.

Changes

Cohort / File(s) Summary
Changelog generation
.github/workflows/generate-changelog.yml
New workflow that computes the latest tag, lists commits since that tag, writes changelog.txt, and uploads release-changelog artifact (15-day retention).
Workflow orchestration
.github/workflows/build-develop.yml, .github/workflows/build-official-android.yml
Adds generate-changelog job and makes mobile build jobs depend on it; tweaks upload-android job needs and sources BUILD_VERSION from build-android outputs.
Android upload action & Fastlane
.github/actions/upload-android/action.yml, android/fastlane/Fastfile
Download release-changelog for develop trigger; prepare Play Store metadata directory and write ${BUILD_VERSION}.txt with truncation to 500 chars (497 + "...") or default text; Fastlane upload options adjusted (skip metadata/images/screenshots flags).
iOS upload action & Fastlane
.github/actions/upload-ios/action.yml, ios/fastlane/Fastfile
Download release-changelog when type==official and trigger==develop; read/truncate changelog to 4000 chars; refactor pilot call to use pilot_options including conditional external distribution and tester group when official and changelog present.

Sequence Diagram(s)

sequenceDiagram
    participant GH as GitHub Actions
    participant Gen as generate-changelog Job
    participant AB as android-build Job
    participant IB as ios-build Job
    participant AU as upload-android Action
    participant IU as upload-ios Action
    participant PS as Play Store
    participant TF as TestFlight

    GH->>Gen: run generate-changelog
    Gen->>Gen: determine latest tag, collect commits, write changelog.txt
    Gen->>GH: upload release-changelog artifact

    GH->>AB: run android build (needs: generate-changelog)
    GH->>IB: run ios build (needs: generate-changelog)

    GH->>AU: invoke upload-android (provides BUILD_VERSION)
    AU->>GH: download release-changelog
    AU->>AU: prepare metadata file (truncate/copy/default)
    AU->>PS: upload via Fastlane (includes changelog/metadata as configured)

    GH->>IU: invoke upload-ios
    IU->>GH: download release-changelog (when official+develop)
    IU->>IU: read/truncate changelog (4000 chars)
    IU->>TF: upload via Fastlane (pilot_options include changelog/external distro)
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Possibly related PRs

Suggested reviewers

  • diegolmello

Poem

🐰 I hopped through commits and gathered each line,
Packaged a changelog, concise and fine,
Sent it to Play and to TestFlight's shore,
Truncated and tidy — then hopped back for more. 🥕✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive Title is vague and generic, using broad terms like 'changelog in beta release' without specifying the key change: implementing CI pipeline features for changelog generation and automated testing notifications. Consider a more specific title that captures the main implementation: e.g., 'feat: auto-generate changelogs and notify external testers in beta CI pipeline' or similar.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed PR successfully implements all CORE-1634 requirements: generates changelogs from commit messages, trims to platform limits (500 chars Android, 4000 chars iOS), uploads changelogs to both platforms, and configures iOS to add external testers and notify them.
Out of Scope Changes check ✅ Passed All changes directly support CORE-1634 objectives: changelog generation workflow, platform-specific metadata preparation, fastlane configuration updates, and CI job orchestration are all in scope.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch beta-changelog

🧹 Recent nitpick comments
.github/actions/upload-android/action.yml (1)

56-61: Consider adding continue-on-error: true for resilience.

If the release-changelog artifact is missing (e.g., the upstream job failed or was skipped), this step will fail the entire upload job. Since lines 76-78 already have a fallback for when changelog.txt doesn't exist, you may want to allow the workflow to continue:

Proposed change
     - uses: actions/download-artifact@v4
       if: ${{ inputs.trigger == 'develop' }}
+      continue-on-error: true
       with:
         name: release-changelog
         path: .

📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between fa430f6 and 6688bf2.

📒 Files selected for processing (2)
  • .github/actions/upload-android/action.yml
  • .github/workflows/generate-changelog.yml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: ESLint and Test / run-eslint-and-test
  • GitHub Check: format
🔇 Additional comments (1)
.github/workflows/generate-changelog.yml (1)

20-20: Verify tag sorting by creation date matches your release workflow.

Using --sort=-creatordate selects the most recently created tag, not the highest semantic version. If you ever backport fixes to older releases (creating a new tag for an old version after a newer release), this could select an unexpected base tag.

If this is intentional for your workflow, no action needed.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Rohit3523 Rohit3523 temporarily deployed to official_ios_build January 8, 2026 16:02 — with GitHub Actions Inactive
@Rohit3523 Rohit3523 had a problem deploying to experimental_ios_build January 8, 2026 16:02 — with GitHub Actions Error
@Rohit3523 Rohit3523 temporarily deployed to official_android_build January 8, 2026 16:02 — with GitHub Actions Inactive
@Rohit3523 Rohit3523 had a problem deploying to experimental_android_build January 8, 2026 16:02 — with GitHub Actions Error
@Rohit3523 Rohit3523 had a problem deploying to upload_official_android January 8, 2026 16:30 — with GitHub Actions Error
@github-actions
Copy link

github-actions bot commented Jan 8, 2026

@Rohit3523 Rohit3523 requested a deployment to approve_e2e_testing January 8, 2026 16:34 — with GitHub Actions Waiting
@Rohit3523 Rohit3523 requested a deployment to experimental_ios_build January 8, 2026 16:37 — with GitHub Actions Waiting
@Rohit3523 Rohit3523 requested a deployment to official_ios_build January 8, 2026 16:37 — with GitHub Actions Waiting
@Rohit3523 Rohit3523 requested a deployment to experimental_android_build January 8, 2026 16:37 — with GitHub Actions Waiting
@Rohit3523 Rohit3523 temporarily deployed to official_android_build January 8, 2026 16:37 — with GitHub Actions Inactive
@Rohit3523 Rohit3523 temporarily deployed to upload_official_android January 8, 2026 17:06 — with GitHub Actions Inactive
@Rohit3523 Rohit3523 requested a deployment to approve_e2e_testing January 8, 2026 17:08 — with GitHub Actions Waiting
@Rohit3523 Rohit3523 requested a deployment to experimental_ios_build January 8, 2026 17:11 — with GitHub Actions Waiting
@Rohit3523 Rohit3523 requested a deployment to experimental_android_build January 8, 2026 17:11 — with GitHub Actions Waiting
@Rohit3523 Rohit3523 requested a deployment to official_android_build January 8, 2026 17:11 — with GitHub Actions Waiting
@Rohit3523 Rohit3523 requested a deployment to official_ios_build January 8, 2026 17:11 — with GitHub Actions Waiting
@Rohit3523 Rohit3523 requested a deployment to approve_e2e_testing January 8, 2026 17:55 — with GitHub Actions Waiting
@Rohit3523 Rohit3523 requested a deployment to approve_e2e_testing January 8, 2026 18:04 — with GitHub Actions Waiting
@Rohit3523 Rohit3523 requested a deployment to official_ios_build January 8, 2026 18:07 — with GitHub Actions Waiting
@Rohit3523 Rohit3523 requested a deployment to experimental_android_build January 8, 2026 18:07 — with GitHub Actions Waiting
@github-actions
Copy link

@github-actions
Copy link

Android Build Available

Rocket.Chat Experimental 4.69.0.108127

Internal App Sharing: https://play.google.com/apps/test/RQVpXLytHNc/ahAO29uNTLjf15VmIQmjjtsjvFhrbNCvEF8qSn5_WCpWXUKBuXLWVrX0nbcfqEBuN8Fya3Vy84CdsRCh08m-O5cX3B

@github-actions
Copy link

iOS Build Available

Rocket.Chat Experimental 4.69.0.108125

@github-actions
Copy link

Android Build Available

Rocket.Chat 4.69.0.108124

@github-actions
Copy link

Android Build Available

Rocket.Chat Experimental 4.69.0.108127

@github-actions
Copy link

iOS Build Available

Rocket.Chat 4.69.0.108126

name: Upload
runs-on: ubuntu-latest
needs: [upload-hold]
needs: [build-android, upload-hold]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change has been made, so I can access BUILD_VERSION from the build-android step

@Rohit3523 Rohit3523 had a problem deploying to official_android_build January 13, 2026 16:42 — with GitHub Actions Error
@Rohit3523 Rohit3523 had a problem deploying to experimental_ios_build January 13, 2026 16:42 — with GitHub Actions Error
@Rohit3523 Rohit3523 had a problem deploying to experimental_android_build January 13, 2026 16:42 — with GitHub Actions Error
@Rohit3523 Rohit3523 marked this pull request as ready for review January 13, 2026 16:44
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In @.github/actions/upload-android/action.yml:
- Around line 62-81: The changelog handling uses byte-based wc -c/head -c and
unquoted $BUILD_VERSION which can break UTF-8 and fail for names with spaces;
update the script to perform character-based truncation (e.g., use a UTF-8 aware
tool such as awk/printf or a short python/perl one-liner to take the first 500
characters and append "..." only when truncated) instead of wc -c/head -c, and
always quote variables and paths (use "$BUILD_VERSION", quote file expansions
like "android/fastlane/metadata/android/en-US/changelogs/$BUILD_VERSION.txt" and
"changelog.txt") so multi-byte characters remain valid and filenames with
special characters are safe.

In @.github/workflows/generate-changelog.yml:
- Around line 17-26: The workflow currently sets LATEST_RELEASE_TAG and always
runs git log "$LATEST_RELEASE_TAG"..HEAD which expands to an empty range when
there are no tags; modify the "Generate changelog" step to check if
LATEST_RELEASE_TAG is empty and use a different git-log invocation in that case
(e.g., git log --pretty=format:"- %s" --no-merges HEAD > changelog.txt),
otherwise keep the existing git log "$LATEST_RELEASE_TAG"..HEAD > changelog.txt;
ensure the guard uses the LATEST_RELEASE_TAG variable and still writes a
fallback "- Improvements and bug fixes" to changelog.txt if the resulting file
is empty.
🧹 Nitpick comments (3)
.github/actions/upload-ios/action.yml (1)

112-116: Consider adding a descriptive step name for clarity in workflow logs.

The step works correctly but lacks a name field, which makes debugging workflow runs harder.

Suggested improvement
-    - uses: actions/download-artifact@v4
+    - name: Download release changelog
+      uses: actions/download-artifact@v4
       if: ${{ inputs.type == 'official' && inputs.trigger == 'develop' }}
       with:
         name: release-changelog
         path: .
ios/fastlane/Fastfile (1)

57-57: Consider extracting the hardcoded group name.

The "External Testers" group name is hardcoded. If this needs to change or vary by environment, consider extracting it to an environment variable or constant.

.github/actions/upload-android/action.yml (1)

56-61: Consider handling missing artifact gracefully.

If the release-changelog artifact is missing or the generate-changelog job failed, this step will fail the entire workflow. Consider adding continue-on-error: true if a fallback changelog is acceptable, since line 77 already handles the missing changelog.txt case.

💡 Optional: Add continue-on-error for graceful fallback
     - uses: actions/download-artifact@v4
       if: ${{ inputs.trigger == 'develop' }}
+      continue-on-error: true
       with:
         name: release-changelog
         path: .
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between ede2569 and fa430f6.

📒 Files selected for processing (7)
  • .github/actions/upload-android/action.yml
  • .github/actions/upload-ios/action.yml
  • .github/workflows/build-develop.yml
  • .github/workflows/build-official-android.yml
  • .github/workflows/generate-changelog.yml
  • android/fastlane/Fastfile
  • ios/fastlane/Fastfile
🧰 Additional context used
🪛 RuboCop (1.82.1)
ios/fastlane/Fastfile

[warning] 39-39: Useless assignment to variable - api_key.

(Lint/UselessAssignment)

🔇 Additional comments (9)
android/fastlane/Fastfile (1)

81-85: LGTM! Upload options align with changelog strategy.

The configuration correctly enables changelog upload (skip_upload_changelogs: false) while skipping unnecessary metadata, images, and screenshots. This aligns with the PR's goal of including release notes in the beta channel.

.github/workflows/generate-changelog.yml (1)

28-33: Artifact configuration looks good.

The 15-day retention is reasonable for CI artifacts, and the artifact name release-changelog matches what the downstream iOS and Android upload actions expect.

ios/fastlane/Fastfile (3)

32-37: Changelog handling logic is correct.

The path resolution and truncation to 4000 characters (App Store limit) with proper ellipsis handling looks good. The conditional assignment correctly returns nil when the file doesn't exist.


39-44: Static analysis false positive - api_key is used implicitly.

The app_store_connect_api_key action stores the key in Fastlane's lane context, making it automatically available to subsequent actions like pilot. This is standard Fastlane behavior.


46-60: Pilot options configuration is well-structured.

The conditional logic correctly:

  • Waits for build processing only when external distribution is needed (!(options[:official] && changelog))
  • Enables external distribution with proper notification settings when a changelog exists for official builds
.github/workflows/build-official-android.yml (1)

75-88: LGTM! Dependency chain and BUILD_VERSION sourcing are correct.

The changes properly:

  1. Add explicit dependency on build-android to ensure the build completes before upload
  2. Source BUILD_VERSION directly from build-android.outputs rather than through the passthrough in upload-hold, which is cleaner and more maintainable

The conditional logic on line 76 correctly handles both manual approval (PR trigger) and automatic flow (develop trigger) scenarios.

.github/workflows/build-develop.yml (2)

22-60: LGTM! Build job dependencies updated correctly.

All four build jobs (android-build-experimental-store, android-build-official-store, ios-build-experimental-store, ios-build-official-store) now correctly depend on both run-eslint-and-test and generate-changelog, ensuring the changelog artifact is available before builds start.


17-20: LGTM! New changelog generation job is well-structured.

The job correctly depends on run-eslint-and-test and references the reusable workflow. The workflow does not require secrets: inherit—it uses only standard GitHub Actions (checkout, git commands, artifact upload) that work with default permissions.

.github/actions/upload-android/action.yml (1)

83-95: LGTM! Fastlane upload logic correctly handles all trigger/type combinations.

The conditional structure covers all expected cases:

  • pr trigger → beta lane
  • develop + experimental → experimental_production
  • develop + official → official_open_testing

Copy link
Member

@diegolmello diegolmello left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Handle code rabbit

@Rohit3523 Rohit3523 requested a deployment to approve_e2e_testing January 14, 2026 16:47 — with GitHub Actions Waiting
@Rohit3523
Copy link
Contributor Author

@CodeRabbit review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 14, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@Rohit3523 Rohit3523 requested a deployment to official_android_build January 14, 2026 16:50 — with GitHub Actions Waiting
@Rohit3523 Rohit3523 requested a deployment to experimental_ios_build January 14, 2026 16:50 — with GitHub Actions Waiting
@Rohit3523 Rohit3523 requested a deployment to experimental_android_build January 14, 2026 16:50 — with GitHub Actions Waiting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants